import {getSubMerchant} from '../../../Tools/HTTPOpertion.js';
Page({
  data: {
    subMerchants:[]
  },
  onLoad: function (options) {
    this.loadData(options.pid);
  },
  loadData: function (pid) {
    var self = this;
    getSubMerchant({ cnd: pid, latitude: "0", longitude:"0" }).then(function (result) {
      console.log(result);
      self.setData({
        subMerchants: result.data.list,
      });
      wx.hideLoading();
    })
      .catch(function (error) {
        console.log(error);
        wx.hideLoading();
      });
  }
})
